<template>
    <div class="table">
        <el-table
            :data="tableData"
            style="width: 100%"
            border=""
        >

            <el-table-column
                type="index"
            >

            </el-table-column>

            <el-table-column
                prop="kindName"
                label="类别名称"
            >
            </el-table-column>

            <el-table-column
                prop="kindLogoUrl"
                label="类别图标"
            >
                <template slot-scope="scope">
                    <img :src="scope.row.kindLogoUrl" alt="" style="width: 40px; height: 40px">
                </template>

            </el-table-column>

            <el-table-column
                label="提问价格"
            >
                <template slot-scope="scope">
                    <span>￥ {{ scope.row.kindAskPrice }}</span>
                </template>
            </el-table-column>

            <el-table-column
                prop="kindSolution"
                label="类别提示"
            >
            </el-table-column>

            <el-table-column
                prop="kindAdvantage"
                label="类别标语"
            >
            </el-table-column>


            <el-table-column
                prop="isShowPage"
                label="是否显示在首页"
            >
                <template slot-scope="scope">
                    <span >{{ scope.row.isShowPage ? '显示' : '不显示' }}</span>
                </template>
            </el-table-column>

            <el-table-column
                prop="isShow"
                label="是否显示"
            >
                <template slot-scope="scope">
                    <span >{{ scope.row.isShow ? '显示' : '不显示' }}</span>
                </template>
            </el-table-column>

            <el-table-column fixed="right" label="操作" width="100">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="edit(scope.$index)">编辑</el-button>
                    <el-button type="text" size="small" @click="del(scope.$index)">删除</el-button>
                </template>
            </el-table-column>

        </el-table>
    </div>
</template>

<script>
export default {
    name: 'Table',
    props: {
        tableData: Array
    },
    data () {
        return {
            
        }
    },
    methods: {
        edit (index) {
     
            this.$emit('edit', index);
        },
        del (index) {
            this.$emit('del', index);
        }
    }
}
</script>

<style lang="stylus" scoped>
    .table
        width 100%
        height 100%
   
</style>


